import request from '@/utils/request'

// 查询出入库任务列表
export function listMdInTask(query) {
  return request({
    url: '/meter/mdInTask/list',
    method: 'get',
    params: query
  })
}

// 查询出入库任务详细
export function getMdInTask(inTaskId) {
  return request({
    url: '/meter/mdInTask/' + inTaskId,
    method: 'get'
  })
}

// 新增出入库任务
export function addMdInTask(data) {
  return request({
    url: '/meter/mdInTask',
    method: 'post',
    data: data
  })
}

// 修改出入库任务
export function updateMdInTask(data) {
  return request({
    url: '/meter/mdInTask',
    method: 'put',
    data: data
  })
}

// 删除出入库任务
export function delMdInTask(inTaskId) {
  return request({
    url: '/meter/mdInTask/' + inTaskId,
    method: 'delete'
  })
}

//修改入库任务状态
export function modifyReceiptTaskstatus(data) {
  return request({
    url: 'meter/mdInTask/editStatus',
    method: 'post',
    data: data
  })
}

//查询入库明细列表
export function queryDetailsList(query) {
  return request({
    url: "meter/mdInTaskDetails/list",
    method: "get",
    params: query
  })
}

//删除入库明细
export function delMdInTaskDetails(inTaskDetailsIds, inTaskNo) {
  return request({
    url: "/meter/mdInTaskDetails/" + inTaskDetailsIds + "/" + inTaskNo,
    method: 'delete',
  })
}

//新增入库明细
export function addReceiptDetails(data) {
  return request({
    url: "meter/mdInTaskDetails",
    method: 'post',
    data: data
  })
}

//修改入库明细
export function startBeSureDetailsExecution(data) {
  return request({
    url: 'meter/mdInTaskDetails',
    method: 'put',
    data: data
  })
}

//入库信息下载数据接口
export function jsonMdInTask(query) {
  return request({
    url: "/meter/mdInTask/downloadJsonMdInTask",
    method: "get",
    params: query,
  });
}

//一键入库接口
export function oneClickStorage(data){
  return request({

    url: '/meter/mdInTask/oneClickStorage',
    method: "post",
    data: data
  })
}
